<?php
namespace Admin\Controller;
use Common\Controller\AdminbaseController;
class MoneyLogController extends AdminbaseController{
	function _initialize() {
		parent::_initialize();
	}

	function index(){
		$userId = I('param.userId', 0);
		$falowWaterType = I('param.falowWaterType',全部);
		if($falowWaterType !== '全部'){
		    $where .= "&falowWaterType=$falowWaterType";
		
		}
 		$trtotal = $this->curl_http(C('user_admin_url').'falowWater/queryFalowWaterList?token='.$_SESSION["TOKEN"].'&curPage=1&pageSize=1&userId='.$userId.$where);
 		$page = $this->page($trtotal['ReturnData']['page']['totalCount'],20);
 		$result = $this->curl_http(C('user_admin_url').'falowWater/queryFalowWaterList?token='.$_SESSION["TOKEN"]."&userId={$userId}&curPage=".$page->Current_page."&pageSize=".$page->Page_size.$where);
 		//print '<pre>';
 		$this->assign("data", $result['ReturnData']['list']);
 		$this->assign('yue',$result['ReturnData']['amount']);
 		//print_r($result['ReturnData']['list']);
 		$this->assign("userId", $userId);
 		$this->assign("page", $page->show('Admin'));
		$this->display();
	}

}